﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ProductListControl.ascx.cs"
    Inherits="eStore.UI.ProductListLoaderControl" %>
<%@ Import Namespace="eStore.Helpers" %>
<asp:Literal ID="ltrAutoScrollCssSetup" runat="server" />
<asp:Literal ID="ltrScript" runat="server" />
<asp:Panel ID="pnlScrollable" runat="server">
    <div class="items">
        <asp:Repeater ID="rptProducts" runat="server">
            <ItemTemplate>
                <div class="productitem">
                    <asp:Panel ID="pnlNameTop" runat="server" CssClass="name" Visible='<%# !Config.ShowNameBelowImageSetting %>'>
                            <a href='<%# SiteRoot + Eval("Url") %>'>
                                <%# Eval("Name") %></a>
                    </asp:Panel>
                    <div class="imagewrapper">
                        <a href='<%# SiteRoot + Eval("Url") %>'>
                            <asp:Image ID="imgProduct" runat="server" Visible="<%# Config.ShowImageSetting %>"
                                ImageUrl='<%# "~/" + ConfigurationManager.AppSettings["eStoreImagesFolder"] + Eval("ImageUrl") %>' />
                        </a>
                    </div>
                    <div class="infowrapper">
                        <asp:Panel ID="pnlNameBottom" runat="server" CssClass="name" Visible='<%# Config.ShowNameBelowImageSetting %>'>
                            <a href='<%# SiteRoot + Eval("Url") %>'>
                                <%# Eval("Name") %></a>
                        </asp:Panel>
                        <asp:Panel ID="pnlPrice" runat="server" CssClass="price" Visible='<%# Config.ShowPriceSetting %>'>
                            <asp:Label ID="lblPriceLabel" runat="server" Text='<%# FormatPriceLabel() %>' CssClass="label"
                                Visible='<%# Config.ShowPriceLabelSetting %>'></asp:Label>
                            <asp:Literal ID="ltrPrice" runat="server" Text='<%# StoreHelper.FormatPrice(Eval("Price").ToString(), CurrencyCulture) %>'></asp:Literal>
                        </asp:Panel>
                        <asp:Panel ID="pnlDescription" runat="server" CssClass="description" Visible='<%# Config.ShowDescriptionSetting %>'>
                            <asp:Literal ID="litProductDescription" runat="server" Text='<%# FormatDescription(Eval("Description").ToString()) %>'></asp:Literal>
                        </asp:Panel>
                        <asp:Panel ID="pnlDetail" runat="server" CssClass="detail" Visible='<%# Config.ShowDetailLinkSetting %>'>
                            <asp:HyperLink ID="hplProductDetail" runat="server" NavigateUrl='<%# SiteRoot + Eval("Url") %>'
                                Text='<%# Resources.eStoreResources.ProductDetailLink %>'></asp:HyperLink>
                        </asp:Panel>
                        <asp:Panel ID="pnlCartAdd" runat="server" CssClass="cartadd" Visible='<%# Config.ShowAddCartLinkSetting %>'>
                            <asp:HyperLink ID="hplAddCart" runat="server" NavigateUrl='<%# SiteRoot + "/eStore/CartAdd.aspx?Product=" + Eval("Guid") + "&pageid=" + PageId + "&mid=" + ModuleId %>'
                                Text='<%# Resources.eStoreResources.AddToCartLink%>'></asp:HyperLink>
                        </asp:Panel>
                    </div>
                </div>
            </ItemTemplate>
        </asp:Repeater>
        <asp:Panel ID="pnlNoProduct" runat="server" CssClass="noproduct" Visible="false">
            <asp:Literal ID="ltrInfo" runat="server" />
        </asp:Panel>
        <div class="cleared">
        </div>
    </div>
</asp:Panel>
<div class="modulepager">
    <portal:mojoCutePager ID="pgr" runat="server" />
</div>
